package xyz.weizhi.tanhua.autoconfig;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import xyz.weizhi.tanhua.autoconfig.Tempalte.FacebodyTemplate;
import xyz.weizhi.tanhua.autoconfig.Tempalte.OssTemplate;
import xyz.weizhi.tanhua.autoconfig.Tempalte.SmsTemplate;
import xyz.weizhi.tanhua.autoconfig.propreties.OssProperties;
import xyz.weizhi.tanhua.autoconfig.propreties.SmsProperties;
import xyz.weizhi.tanhua.autoconfig.propreties.FacebodyProperties;

/**
 * @Author milian
 * @Date 2021/10/21 0021 10:56
 */
@EnableConfigurationProperties(value = {
        SmsProperties.class,
        OssProperties.class,
        FacebodyProperties.class
})
public class TanhuaAtuoConfiguration {
    @Bean
    public SmsTemplate smsTemplate(SmsProperties smsProperties){
        return new SmsTemplate(smsProperties);
    }
    @Bean
    public OssTemplate ossTemplate(OssProperties ossProperties){return new OssTemplate(ossProperties);}
    @Bean
    public FacebodyTemplate facebodyTemplate(){return new FacebodyTemplate();}
}
